package com.utcs.modules.resource.basic.service;

import com.utcs.common.service.TreeService;
import com.utcs.modules.resource.basic.dao.DepartmentDao;
import com.utcs.modules.resource.basic.entity.Department;
import com.utcs.modules.resource.basic.utils.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by Fly on 2017/5/23.
 * 部门Serivce
 */
@Service
@Transactional(readOnly = true)
public class DepartmentService extends TreeService<DepartmentDao,Department>{


    /**
     * 获取所有部门列表
     * @return
     */
    public List<Department> findAll(){
        return UserUtils.getDepartmentAllList();
    }
}
